Optimal. Leaf size=47 \[ \frac{-d+i c}{2 f (a+i a \tan (e+f x))}+\frac{x (c-i d)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.042418, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {3526, 8} \[ \frac{-d+i c}{2 f (a+i a \tan (e+f x))}+\frac{x (c-i d)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3526
Rule 8
Rubi steps
\begin{align*} \int \frac{c+d \tan (e+f x)}{a+i a \tan (e+f x)} \, dx &=\frac{i c-d}{2 f (a+i a \tan (e+f x))}+\frac{(c-i d) \int 1 \, dx}{2 a}\\ &=\frac{(c-i d) x}{2 a}+\frac{i c-d}{2 f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 0.549965, size = 102, normalized size = 2.17 \[ \frac{\cos (e+f x) (c+d \tan (e+f x)) ((c (2 f x-i)-2 i d f x+d) \tan (e+f x)-2 i c f x+c+d (-2 f x+i))}{4 a f (\tan (e+f x)-i) (c \cos (e+f x)+d \sin (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.028, size = 121, normalized size = 2.6 \begin{align*}{\frac{-{\frac{i}{4}}\ln \left ( \tan \left ( fx+e \right ) -i \right ) c}{af}}-{\frac{\ln \left ( \tan \left ( fx+e \right ) -i \right ) d}{4\,af}}+{\frac{c}{2\,af \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{{\frac{i}{2}}d}{af \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{\ln \left ( \tan \left ( fx+e \right ) +i \right ) d}{4\,af}}+{\frac{{\frac{i}{4}}\ln \left ( \tan \left ( fx+e \right ) +i \right ) c}{af}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.58086, size = 108, normalized size = 2.3 \begin{align*} \frac{{\left (2 \,{\left (c - i \, d\right )} f x e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.3799, size = 88, normalized size = 1.87 \begin{align*} \begin{cases} \frac{\left (i c - d\right ) e^{- 2 i e} e^{- 2 i f x}}{4 a f} & \text{for}\: 4 a f e^{2 i e} \neq 0 \\x \left (- \frac{c - i d}{2 a} + \frac{\left (c e^{2 i e} + c - i d e^{2 i e} + i d\right ) e^{- 2 i e}}{2 a}\right ) & \text{otherwise} \end{cases} + \frac{x \left (c - i d\right )}{2 a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.3945, size = 122, normalized size = 2.6 \begin{align*} -\frac{\frac{{\left (i \, c + d\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a} + \frac{{\left (-i \, c - d\right )} \log \left (-i \, \tan \left (f x + e\right ) + 1\right )}{a} + \frac{-i \, c \tan \left (f x + e\right ) - d \tan \left (f x + e\right ) - 3 \, c - i \, d}{a{\left (\tan \left (f x + e\right ) - i\right )}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]